package InnerClass;

public class tsetaaa {
    public void test1(A a){
        a.run();
    }

    public static void main(String[] args) {
        tsetaaa t=new tsetaaa();
        t.test1(new A(){
            public void run() {
                System.out.println("第一个匿名内部类！");
            }
        });
        t.test1(new A() {
            @Override
            public void run() {
                System.out.println("第二个匿名内部类");
            }
        });
    }
}
interface A{
    void run();
}
class B implements A{
    @Override
    public void run() {}
}